package com.guchenbo.example.gc.oom;

import java.util.ArrayList;
import java.util.List;

/**
 * java堆用于存放java对象实例
 * VM Args: -Xms20m -Xmx20m -XX:+HeapDumpOnOutOfMemoryError
 * -Xms -Xmx java堆设置参数
 * Created by CreGu on 2016/5/24.
 */
public class HeapOOM {

    public static void main(String[] args) {
        List<OOMObject> oomObjects = new ArrayList<OOMObject>();
        while (true) {
            oomObjects.add(new OOMObject());
        }
    }

    static class OOMObject{

    }
}
